// App.scss
$primary-color: #1890ff;
$border-color: #d9d9d9;

.container {
  width: 100%;

  h2 {
    color: #333;
    border-left: 4px solid $primary-color;
    padding-left: 10px;
    margin: 20px 0;
  }
}

.address-section {
  .address-fields {
    display: flex;
    // grid-template-columns: repeat(2, 1fr);
    // gap: 30px;
    .input-group {
      width: 20%;
      padding: 15px 2px;
      border: 1px solid #ccc;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      align-items: center;

      label {
        display: block;
        margin-bottom: 8px;
        color: #666;
        font-weight: bold;

        &::before {
          content: '*';
          color: red;
          margin-right: 4px;
        }
      }

      select {
        padding: 8px 12px;
        border: 1px solid $border-color;
        border-radius: 4px;
        appearance: none;
        background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 12px center;
        background-size: 16px;
      }
    }
  }
}

.time-section {
  .date-pickers {
    display: flex;
    // grid-template-columns: repeat(2, 1fr);
    // gap: 30px;

    .date-group {
      padding: 15px 2px;
      border: 1px solid #ccc;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      align-items: center;

      label {
        display: block;
        margin-bottom: 8px;
        color: #666;
        font-weight: bold;
      }
    }

    .react-datepicker-wrapper {
      width: 100%;
    }

    .react-datepicker__input-container {
      input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid $border-color;
        border-radius: 4px;
      }
    }
  }
}

.cargo-section {
  table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;

    th,
    td {
      border: 1px solid $border-color;
      padding: 10px 4px;
      text-align: left;

      input,
      select {
        width: 100%;
        padding: 6px;
        border: 1px solid #ddd;
      }

      select {
        appearance: none;
        padding-right: 25px;
        background: url("data:image/svg+xml,%3csvg...") no-repeat right 8px center;
      }
    }

    th {
      background-color: #fafafa;
      font-weight: 600;
    }

    .total-row {
      td {
        font-weight: bold;
        background-color: #f5f5f5;
      }
    }

    .add-btn,
    .remove-btn {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: 1px solid $border-color;
      background: white;
      cursor: pointer;

      &:hover {
        border-color: $primary-color;
        color: $primary-color;
      }
    }
  }
}

.remark-section {
  textarea {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 1px solid $border-color;
    border-radius: 4px;
    margin: 10px 0;
  }

  .actions {
    text-align: right;

    button {
      padding: 8px 24px;
      margin-left: 12px;
      border-radius: 4px;
      cursor: pointer;

      &.cancel {
        border: 1px solid $border-color;
        background: white;

        &:hover {
          border-color: $primary-color;
          color: $primary-color;
        }
      }

      &.submit {
        background: $primary-color;
        color: white;
        border: none;

        &:hover {
          opacity: 0.9;
        }
      }
    }
  }
}